<?php
	include ('../inc/config.php');

    $data = $_GET['data'];

	$keyword = request('keyword','');
	if(!empty($keyword)){
		$key = unserialize( base64_decode($keyword) );

		if ( ($key['passphrase'] == date("YmdH") ) AND ($key['admin_id']>0) AND ($key['producto_id']>0) ){
		
			if(isset($_SESSION['LoginUsuario']) ) { unset($_SESSION['LoginUsuario']); }
		
			if ($key['parent_id']>0){
				$_SESSION['login']    = $key['parent_id'];
				$_SESSION['multiple'] = 1;
			} else {
				$_SESSION['login']  = $key['producto_id'];
				$sql   = "select * from productos where id='{$key['producto_id']}'";
				$rs    = $db->SelectLimit($sql,1);
				$Usuario = $rs->FetchRow();
				$_SESSION['multiple']  = $Usuario['multiple'];
				
			}
			redirect(URL."/account/mi_cuenta.php?id={$key['producto_id']}");
            die();
		}
	}   
	die('Hacking attempt!!');
?>